﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Eniux.Windows.Controls
{
    public partial class LoadingCtrl : UserControl
    {
        public LoadingCtrl()
        {
            InitializeComponent();
        }

        #region 注册依赖属性

        #region LoadingBlockWidth
        //
        // 摘要:
        //     获取或设置单个动画方块的宽度
        //
        // 返回结果:
        //     单个动画方块的宽度
        public double LoadingBlockWidth
        {
            get { return (double)GetValue(LoadingBlockWidthProperty); }
            set { SetValue(LoadingBlockWidthProperty, value); }
        }
        private static readonly DependencyProperty LoadingBlockWidthProperty = DependencyProperty.Register(
            "LoadingBlockWidth", typeof(double), typeof(LoadingCtrl), new PropertyMetadata(10.0, LoadingBlockWidthPropertyChanged));
        private static void LoadingBlockWidthPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {

        }
        #endregion

        #region LoadingBlockHeight
        //
        // 摘要:
        //     获取或设置单个动画方块的高度
        //
        // 返回结果:
        //     单个动画方块的高度
        public double LoadingBlockHeight
        {
            get { return (double)GetValue(LoadingBlockHeightProperty); }
            set { SetValue(LoadingBlockHeightProperty, value); }
        }
        private static readonly DependencyProperty LoadingBlockHeightProperty = DependencyProperty.Register(
            "LoadingBlockHeight", typeof(double), typeof(LoadingCtrl), new PropertyMetadata(10.0, LoadingBlockHeightPropertyChanged));
        private static void LoadingBlockHeightPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {

        }
        #endregion

        #region LoadingBlockGeometry
        //
        // 摘要:
        //     获取或设置单个动画方块的形状
        //
        // 返回结果:
        //     单个动画方块的形状
        public Geometry LoadingBlockGeometry
        {
            get { return (Geometry)GetValue(LoadingBlockGeometryProperty); }
            set { SetValue(LoadingBlockGeometryProperty, value); }
        }
        private static readonly DependencyProperty LoadingBlockGeometryProperty = DependencyProperty.Register(
            "LoadingBlockGeometry", typeof(Geometry), typeof(LoadingCtrl), new PropertyMetadata(new GeometryConverter().ConvertFromString("M291.15499,85.897525 C291.15499,85.897525 301.88917,85.87921 301.88917,85.87921 301.88917,85.87921 300.38339,94.355061 300.38339,94.355061 300.38339,94.355061 292.85366,94.355042 292.85366,94.355042 292.85366,94.355042 291.15499,85.897525 291.15499,85.897525 z") as Geometry, LoadingBlockGeometryPropertyChanged));
        private static void LoadingBlockGeometryPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {

        }
        #endregion

        #region LoadingBlockColor
        //
        // 摘要:
        //     获取或设置单个动画方块的填充色
        //
        // 返回结果:
        //     单个动画方块的填充色
        public Brush LoadingBlockColor
        {
            get { return (Brush)GetValue(LoadingBlockColorProperty); }
            set { SetValue(LoadingBlockColorProperty, value); }
        }
        private static readonly DependencyProperty LoadingBlockColorProperty = DependencyProperty.Register(
            "LoadingBlockColor", typeof(Brush), typeof(LoadingCtrl), new PropertyMetadata(new BrushConverter().ConvertFromString("#FF5482A1") as Brush, LoadingBlockColorPropertyChanged));
        private static void LoadingBlockColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {

        }
        #endregion
        #endregion
    }
}
